#  date 2013/2/17
#  name locatorClassify
#  author lizhi
#  E_mail  guishiye@sina.cn
#  QQ  294596787
import maya.cmds as mc
import sys
sys.path.append('E:/script/facial_sys')
import commonScripts02 as css

reload(css)
cssT= css.commonScripts()
#-----------------------------  base joint classify  ----------------------------
def allLocator():
    mc.select('*_locator',r=True)
    objectsel=mc.ls(sl=True)
    
    objwants=cssT.getTypeObject(tpye='kLocator',objectsel=objectsel)
    return(objwants)
    
def facialObj():
    facialObj=[u'Mouth_C_All_jnt','Mouth_C_LowLip_jnt','Mouth_C_UpLip_jnt','Mouth_L_Corner_jnt','Mouth_L_LowLipCenter_jnt','Mouth_L_UpLipCenter_jnt','Mouth_R_Corner_jnt','Mouth_R_LowLipCenter_jnt','Mouth_R_UpLipCenter_jnt','facial_C_Nasalis_jnt','facial_C_NoseTip_jnt','facial_C_Nose_jnt','facial_C_brow_jnt','facial_C_lowerTooth_jnt','facial_C_tongue01_jnt','facial_C_tongue02_jnt','facial_C_tongue03_jnt','facial_C_tongue04_jnt','facial_C_upperTooth_jnt','facial_L_Brow01_jnt','facial_L_Brow02_jnt','facial_L_Brow03_jnt','facial_L_Brow04_jnt','facial_L_Brow05_jnt','facial_L_Ear_jnt','facial_L_EyeBrow_jnt','facial_L_EyeInnCorner_jnt','facial_L_EyeOutCorner_jnt','facial_L_Levator_jnt','facial_L_LowerEye_jnt','facial_L_LowerEyelid_jnt','facial_L_LowerInnerEyelid_jnt','facial_L_LowerOuterEyelid_jnt','facial_L_Nostril_jnt','facial_L_Orbital_jnt','facial_L_Puffer_jnt','facial_L_UpperEye_jnt','facial_L_UpperEyelid_jnt','facial_L_UpperInnerEyelid_jnt','facial_L_UpperOuterEyelid_jnt','facial_L_eyeCenter_jnt','facial_R_Brow01_jnt','facial_R_Brow02_jnt','facial_R_Brow03_jnt','facial_R_Brow04_jnt','facial_R_Brow05_jnt','facial_R_Ear_jnt','facial_R_EyeBrow_jnt','facial_R_EyeInnCorner_jnt','facial_R_EyeOutCorner_jnt','facial_R_Levator_jnt','facial_R_LowerEye_jnt','facial_R_LowerEyelid_jnt','facial_R_LowerInnerEyelid_jnt','facial_R_LowerOuterEyelid_jnt','facial_R_Nostril_jnt','facial_R_Orbital_jnt','facial_R_Puffer_jnt','facial_R_UpperEye_jnt','facial_R_UpperEyelid_jnt','facial_R_UpperInnerEyelid_jnt','facial_R_UpperOuterEyelid_jnt','facial_R_eyeCenter_jnt']
    return(facialObj)
    
def parentObj():
    parentObjects=[u'facial_C_brow_jnt','facial_C_Nasalis_jnt','facial_L_eyeCenter_jnt','facial_R_eyeCenter_jnt','facial_R_EyeBrow_jnt','facial_L_EyeBrow_jnt','facial_L_Levator_jnt','facial_R_Levator_jnt','facial_R_Orbital_jnt','facial_R_Puffer_jnt','facial_R_Ear_jnt','facial_L_Orbital_jnt','facial_L_Puffer_jnt','facial_C_Nose_jnt','Mouth_C_All_jnt','facial_L_Ear_jnt']
    return(parentObjects)
    
    
def mouthChildObj():
    mouthChildObjects=[u'Mouth_L_Corner_jnt','Mouth_L_LowLipCenter_jnt','Mouth_L_UpLipCenter_jnt','Mouth_R_Corner_jnt','Mouth_R_LowLipCenter_jnt','Mouth_R_UpLipCenter_jnt','Mouth_C_LowLip_jnt','Mouth_C_UpLip_jnt']
    
    return(mouthChildObjects)
    
def eyeLfChildObj():
    eyeLfChildObjects=['facial_L_UpperInnerEyelid_jnt','facial_L_UpperEyelid_jnt','facial_L_UpperOuterEyelid_jnt','facial_L_EyeOutCorner_jnt','facial_L_LowerOuterEyelid_jnt','facial_L_LowerEyelid_jnt','facial_L_LowerInnerEyelid_jnt','facial_L_EyeInnCorner_jnt','facial_L_UpperEye_jnt','facial_L_LowerEye_jnt']
    
    return(eyeLfChildObjects)
    
def eyeRtChildObj():
    eyeRtChildObjects=['facial_R_UpperInnerEyelid_jnt','facial_R_UpperEyelid_jnt','facial_R_UpperOuterEyelid_jnt','facial_R_EyeOutCorner_jnt','facial_R_LowerOuterEyelid_jnt','facial_R_LowerEyelid_jnt','facial_R_LowerInnerEyelid_jnt','facial_R_EyeInnCorner_jnt','facial_R_UpperEye_jnt','facial_R_LowerEye_jnt']
    
    return(eyeRtChildObjects)
    
def eyeBrownLfObj():
    eyeBrownLfObjects=['facial_L_Brow01_jnt','facial_L_Brow02_jnt','facial_L_Brow03_jnt','facial_L_Brow04_jnt','facial_L_Brow05_jnt']
    return (eyeBrownLfObjects)
    
def eyeBrownRtObj():
    eyeBrownRtObjects=['facial_R_Brow01_jnt','facial_R_Brow02_jnt','facial_R_Brow03_jnt','facial_R_Brow04_jnt','facial_R_Brow05_jnt']
    return (eyeBrownRtObjects)
    
def noseChildObj():
    noseChildObj=['facial_L_Nostril_jnt','facial_C_NoseTip_jnt','facial_R_Nostril_jnt']
    return(noseChildObj)
    
def seconParentObj():
    seconParentObjects=[u'facial_C_Nose_jnt','Mouth_C_All_jnt','facial_L_Puffer_jnt','facial_R_Puffer_jnt','facial_R_Orbital_jnt','facial_L_Orbital_jnt','facial_L_Levator_jnt','facial_R_Levator_jnt','facial_C_Nasalis_jnt','facial_C_brow_jnt','facial_R_EyeBrow_jnt','facial_L_EyeBrow_jnt','facial_L_eyeCenter_jnt','facial_R_eyeCenter_jnt','facial_R_Ear_jnt','facial_L_Ear_jnt']
    return(seconParentObjects)
    
def tongueObj():
    tongueObj=['facial_C_tongue04_jnt','facial_C_tongue03_jnt','facial_C_tongue02_jnt','facial_C_tongue01_jnt']
    return(tongueObj)
    
def headBaseObj():
    headBaseObj=['Jaw03_jnt', 'Jaw02_jnt', 'Jaw01_jnt', 'facial_jnt', 'neckRoot_jnt']
    return(headBaseObj)
    
def needSecondryjnt():
    needSecondryJoints=['facial_L_Brow05_locator','facial_L_Brow04_locator','facial_L_Brow03_locator','facial_L_Brow02_locator','facial_L_Brow01_locator','facial_R_Brow01_locator','facial_R_Brow02_locator','facial_R_Brow03_locator','facial_R_Brow04_locator','facial_R_Brow05_locator','Mouth_L_Corner_locator','Mouth_L_LowLipCenter_locator','Mouth_L_UpLipCenter_locator','Mouth_C_UpLip_locator','Mouth_C_LowLip_locator','Mouth_R_UpLipCenter_locator','Mouth_R_LowLipCenter_locator','Mouth_R_Corner_locator']
    return(needSecondryJoints)
    
def facial_Puffer():
    facial_Puffer=['facial_L_Puffer_locator','facial_R_Puffer_locator']
    return(facial_Puffer)
#------------------------------   offset and root ------------------------------------
def offsetRootClassify():
    needaddGrp = ['Mouth_C_All_zero','Mouth_L_LowLipCenter_zero','Mouth_C_LowLip_zero','Mouth_C_UpLip_zero','Mouth_L_Corner_zero','Mouth_L_UpLipCenter_zero','Mouth_R_Corner_zero','Mouth_R_LowLipCenter_zero','Mouth_R_UpLipCenter_zero']
    return(needaddGrp)
 # ----------------------------- singgle Variable  -----------------------------------
def jaw01Locator():
    jaw01Locators=['Jaw01_locator']
    return(jaw01Locators)
    
def jaw02Locator():
    jaw02Locators=['Jaw02_locator']
    return(jaw02Locators)
    
def faciallocator():
    faciallocator=['facial_locator']
    return(faciallocator)

def eyeLocator():
    eyeLocators=['facial_L_eyeCenter_locator','facial_R_eyeCenter_locator']
    return(eyeLocators)
def neckRootlocator():
    neckRootlocator=['neckRoot_locator']
    return(neckRootlocator)
#--------------------------------  ctrls all need add  ------------------------------
def grplocator():
    grplocator=['facial_R_eyeCenter_locator','facial_L_eyeCenter_locator','facial_L_EyeBrow_locator','facial_R_EyeBrow_locator','facial_C_Nose_locator','Mouth_C_All_locator']
    return(grplocator)